package util;

import java.awt.*;

/**
 * @author zhongwen
 * @description 获取当前屏幕宽高的工具类（不包括导航任务栏）
 * @date 2021-12-08 21:25
 */
public class ScreenUtils {
    private static GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
    private static Rectangle screenSize = ge.getMaximumWindowBounds();

    public static int getScreenWidth(){
        return (int) screenSize.getWidth();
    }

    public static int getScreenHeight(){
        return (int) screenSize.getHeight();
    }
}
